#!/usr/bin/env python
import time
import Seven_Segment_Display as display

display.init()

state = False
prev_state = False

while True:
  state = display.get_switch()
  # GPIO Input rising slope
  if state and not prev_state:
    print('switch pressed')
  prev_state = state
